package team.yg.asset.controller;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import team.yg.asset.pojo.User;
import team.yg.asset.service.IUserService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Eins
 * @since 2024-10-03
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {

    @Autowired
    IUserService userService;

    @GetMapping("/test1")
    public String test1(){
        User user = userService.queryRoot();
        log.info("controller-用户：{}",user);
        return user.toString();
    }

}
